{{include file="header.html"}}
<body>
	<!-- 主体 -->
	<div class="container_i container_p">
		<!-- 右边侧边栏 -->
		<div class="right" id="printContainer">
			<!-- 项目管理部分 -->
			<p style="text-align:center;">教师个人信息表</p>
			<div class="item">
				<table border="1">
					<tr>
						<td class="one">姓名</td>
						<td class="two"><input type="text" value="王小茗"></td>
						<td class="one">年龄</td>
						<td class="two"><input type="text" value="40"></td>
						<td class="one">性别</td>
						<td class="two">
							<label for="man"><input type="radio" name="sex" id="man">男</label>
							<label for="woman"><input type="radio" checked="" name="sex" id="woman">女</label>
						</td>
					</tr>
					<tr>
						<td class="one">出生日期</td>
						<td class="two"><input type="text" value="2017.8.31"></td>
						<td class="one">政治面貌</td>
						<td class="two"><input type="text" value="党员"></td>
						<td class="one">民族</td>
						<td class="two"><input type="text" value="汉族"></td>
					</tr>
					<tr>
						<td class="one">学历</td>
						<td class="two"><input type="text" value="硕士"></td>
						<td class="one">学位</td>
						<td class="two"><input type="text" value="硕士"></td>
						<td class="one">导师类型</td>
						<td class="two"><input type="text" value="教师"></td>
					</tr>
					<tr>
						<td class="one">工号</td>
						<td class="two"><input type="text" value="11014410101"></td>
						<td class="one">手机</td>
						<td class="two"><input type="text" value="1234567890"></td>
						<td class="one">邮箱</td>
						<td class="two"><input type="text" value="1234567890@qq.com"></td>
					</tr>
					<tr>
						<td class="one">职称</td>
						<td class="two"><input type="text" value="计算机管理主任"></td>
						<td class="one">研究方向</td>
						<td class="two"><input type="text" value="计算机操作系统"></td>
						<td class="one">所属院系</td>
						<td class="two"><input type="text" value="电信学院"></td>
					</tr>
					<tr>
						<td class="one">单位</td>
						<td class="two" colspan="5"><input type="text" value="计算机教学实验中心"></td>
					</tr>
					<tr>
						<td class="one">家庭地址</td>
						<td class="two" colspan="5"><input type="text" value="广东省茂名市茂南区官渡二路139号"></td> 
					</tr>
					<tr>
						<td class="one" rowspan="10" >所得奖项</td>
						<td class="three" colspan="3">奖项名称</td>
						<td class="one">级别</td>
						<td class="one">获奖时间</td>
					</tr>
					<tr>
						<td colspan="3">智能机器人研究项目一等奖</td>
						<td>国家级</td>
						<td>2017.09.03</td>
					</tr>
					<tr>
						<td colspan="3">计算机操作系统竞赛二等奖</td>
						<td>国家级</td>
						<td>2017.09.03</td>
					</tr>
					<tr>
						<td colspan="3">基于php操作系统的研发及应用结项</td>
						<td>省级</td>
						<td>2017.09.03</td>
					</tr>
				</table>
				<div class="btn">
					<button><a href="item_detail.html" style="color:#fff;">返回</a></button>
					<button class="print_btn" style="right:0;" onclick="printpage()">打印</button>
				</div>
			</div>
		</div>
	</div>
	<script>
	$(function(){
		$("input").attr("disabled","false").css("border","none");
	})
	jQuery.fn.extend({
	    autoHeight: function(){
	        return this.each(function(e){
	            var $this = jQuery(this);
	            if( !$this.attr('_initAdjustHeight') ){
	                $this.attr('_initAdjustHeight', $this.outerHeight());
	            }
	            _adjustH(this).on('input', function(){
	                _adjustH(this);
	            });
	            
	        });
	        /**
	         * 重置高度 
	         * @param {Object} elem
	         */
	        function _adjustH(elem){
	            var $obj = jQuery(elem);
	            test(elem);
	            return $obj.css({height: $obj.attr('_initAdjustHeight'), 'overflow-y': 'hidden'})
	                    .height( elem.scrollHeight );
	        }
	    }
	});
	// 使用
	$(function(){
	    $('textarea').autoHeight();
		$('.col-sm-9').each(function(a,b) {
			var col=$(this);
			var height=col.css('height');
			col.siblings('div.col-sm-1.br.chushi').css('height',height);
		});
				
    });
    function test(elem){
    	var $obj = jQuery(elem);
    	var parent=$obj.parent();
    	var height=elem.scrollHeight+32;
    	parent.siblings('div.col-sm-1.br.chushi').css({height:height});
    	parent.siblings('div.col-sm-1.br.chushi').children('span').css({height:height});
    }

 
    function printpage(){
    	$("#printContainer").printArea();
  	}
    </script>
</body>
</html>